package com.zy.cat.entity.game;


import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.IdClass;
import javax.persistence.Index;
import javax.persistence.Table;

import com.zy.cat.entity.primary.CVSInfoPrimary;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 
 * @info 9趣猫大转盘每日中奖数据记录实体类
 * @author Link
 * @date 2019-10-30 09:14
 */
@Entity
@Table(name = "zy_cat_game_trun_daily_history", indexes = {
		@Index(name = "pid", columnList = "pid"),
		@Index(name = "ctime", columnList = "ctime")})
@Data
@NoArgsConstructor
@AllArgsConstructor
@ApiModel("9趣猫大转盘每日数据记录实体类")
@IdClass(CVSInfoPrimary.class)
public class TrunInfo {
	
	@Id
	@Column(columnDefinition = "VARCHAR(20) NOT NULL  COMMENT '用户账号ID'")
	@ApiModelProperty(value = "用户账号ID", example = "fe53d6a4fa29641")
	private String pid;
	
	@Id
	@Column(columnDefinition = "VARCHAR(10) NOT NULL  COMMENT '创建时间'")
	@ApiModelProperty(value = "创建时间", example = "2019-02-22")
	private String ctime;
	
	@Column(columnDefinition = "BIGINT(10) DEFAULT '0' COMMENT '今日抽奖次数'")
	@ApiModelProperty(value = "今日抽奖次数", example = "1")
	private int dcount;
	
	@Column(name = "extra_bean_num",columnDefinition = "BIGINT(10) DEFAULT '0' COMMENT '额外奖励获取现金豆数'")
	@ApiModelProperty(value = "额外奖励获取现金豆数", example = "1")
	private long extraBeanNum;
	
	@Column(name = "trun_bean_num",columnDefinition = "BIGINT(10) DEFAULT '0' COMMENT '转盘抽奖得到现金豆数(不含翻倍)'")
	@ApiModelProperty(value = "转盘抽奖得到现金豆数(不含翻倍)", example = "1")
	private long trunBeanNum;
	
	@Column(name = "double_bean_num",columnDefinition = "BIGINT(10) DEFAULT '0' COMMENT '转盘抽奖得到现金豆数(含翻倍)'")
	@ApiModelProperty(value = "转盘抽奖得到现金豆数(含翻倍)", example = "1")
	private long doubleBeanNum;
	
	@Column(name = "bean_num",columnDefinition = "BIGINT(10) DEFAULT '0' COMMENT '总计得到现金豆'")
	@ApiModelProperty(value = "总计得到现金豆", example = "1")
	private long beanNum;
	
	@Column(name = "extra_fertilizer_num",columnDefinition = "BIGINT(10) DEFAULT '0' COMMENT '额外奖励获取现金豆数'")
	@ApiModelProperty(value = "额外奖励获取肥料数", example = "1")
	private long extraFertilizerNum;
	
	@Column(name = "trun_fertilizer_num",columnDefinition = "BIGINT(10) DEFAULT '0' COMMENT '转盘抽奖得到现金豆数(不含翻倍)'")
	@ApiModelProperty(value = "转盘抽奖得到肥料数(不含翻倍)", example = "1")
	private long trunFertilizerNum;
	
	@Column(name = "double_fertilizer_num",columnDefinition = "BIGINT(10) DEFAULT '0' COMMENT '转盘抽奖得到现金豆数(含翻倍)'")
	@ApiModelProperty(value = "转盘抽奖得到肥料数(含翻倍)", example = "1")
	private long doubleFertilizerNum;
	
	@Column(name = "fertilizer_num",columnDefinition = "BIGINT(10) DEFAULT '0' COMMENT '总计得到现金豆'")
	@ApiModelProperty(value = "总计得到肥料豆", example = "1")
	private long fertilizerNum;
	
	@Column(columnDefinition = "BIGINT(10) DEFAULT '0' COMMENT '礼包数'")
	@ApiModelProperty(value = "礼包数", example = "1")
	private long pkgs;

	@Column(columnDefinition = "VARCHAR(20) DEFAULT '-'  COMMENT '最后更新时间'")
	@ApiModelProperty(value = "最后更新时间", example = "2019-02-22 10:10:10")
	private String ltime;
	

	public TrunInfo(String pid) {
		super();
		this.pid = pid;
	}

	public TrunInfo(String pid, String ctime) {
		super();
		this.pid = pid;
		this.ctime = ctime;
	}

	public TrunInfo(String pid, int dcount, long extraBeanNum, long trunBeanNum, long doubleBeanNum, long beanNum,
			long pkgs) {
		super();
		this.pid = pid;
		this.dcount = dcount;
		this.extraBeanNum = extraBeanNum;
		this.trunBeanNum = trunBeanNum;
		this.doubleBeanNum = doubleBeanNum;
		this.beanNum = beanNum;
		this.pkgs = pkgs;
	}
}
